﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharkOS.Core.Caracteres
{
    class Caracteres
    {
        Cosmos.Hardware.VGAScreen screen = new Cosmos.Hardware.VGAScreen();
        #region lettre
        public uint[] pixelA = { 0,0,0,0,0,0,0,0,
                            0,0,0,1,1,0,0,0,
                            0,0,1,1,1,1,0,0,
                            0,1,1,0,0,1,1,0,
                            0,1,1,1,1,1,1,0,
                            0,1,1,1,1,1,1,0,
                            0,1,1,0,0,1,1,0,
                            0,1,1,0,0,1,1,0};

        public uint[] pixelB = { 0,0,0,0,0,0,0,0,
                            0,1,1,1,1,0,0,0,
                            0,1,1,1,1,0,0,0,
                            0,1,1,0,1,1,0,0,
                            0,1,1,1,1,1,0,0,
                            0,1,1,0,0,1,1,0,
                            0,1,1,1,1,1,1,0,
                            0,1,1,1,1,1,0,0};

        public uint[] pixelC = { 0,0,0,0,0,0,0,0,
                            0,0,1,1,1,1,1,0,
                            0,1,1,1,1,1,1,0,
                            0,1,1,0,0,0,0,0,
                            0,1,1,0,0,0,0,0,
                            0,1,1,0,0,0,0,0,
                            0,1,1,1,1,1,1,0,
                            0,0,0,1,1,1,1,0};

        public uint[] pixelD = { 0,0,0,0,0,0,0,0,
                            0,1,1,1,0,0,0,0,
                            0,1,1,1,1,0,0,0,
                            0,1,1,0,1,1,0,0,
                            0,1,1,0,0,1,1,0,
                            0,1,1,0,1,1,0,0,
                            0,1,1,1,1,0,0,0,
                            0,1,1,1,0,0,0,0};

        public uint[] pixelE = { 0,1,1,1,1,1,1,0,
                            0,1,1,1,1,1,1,0,
                            0,1,1,0,0,0,0,0,
                            0,1,1,1,1,1,1,0,
                            0,1,1,1,1,1,1,0,
                            0,1,1,0,0,0,0,0,
                            0,1,1,1,1,1,1,0,
                            0,1,1,1,1,1,1,0};

        public uint[] pixelF = { 0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0};

        public uint[] pixelG = { 0,0,0,0,0,0,0,0,
                            0,0,0,1,1,1,1,0,
                            0,1,1,1,1,1,1,0,
                            0,1,1,0,0,0,0,0,
                            0,1,1,0,1,1,1,0,
                            0,1,1,0,1,1,1,0,
                            0,0,1,1,0,1,1,0,
                            0,0,0,1,1,1,1,0};

        public uint[] pixelH = { 0,0,0,0,0,0,0,0,
                            0,1,1,0,0,1,1,0,
                            0,1,1,0,0,1,1,0,
                            0,1,1,0,0,1,1,0,
                            0,1,1,1,1,1,1,0,
                            0,1,1,1,1,1,1,0,
                            0,1,1,0,0,1,1,0,
                            0,1,1,0,0,1,1,0};

        public uint[] pixelI = { 0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0};

        public uint[] pixelJ = { 0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0};

        public uint[] pixelK = { 0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0};

        public uint[] pixelL = { 0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0};

        public uint[] pixelM = { 0,0,0,0,0,0,0,0,
                            0,1,1,0,0,0,1,1,
                            0,1,1,1,0,1,1,1,
                            0,1,1,0,1,0,1,1,
                            0,1,1,0,0,0,1,1,
                            0,1,1,0,0,0,1,1,
                            0,1,1,0,0,0,1,1,
                            0,1,1,0,0,0,1,1};

        public uint[] pixelN = { 0,0,0,0,0,0,1,1,
                            0,1,1,0,0,0,1,1,
                            0,1,1,1,0,0,1,1,
                            0,1,1,0,1,0,1,1,
                            0,1,1,0,0,1,1,1,
                            0,1,1,0,0,0,1,1,
                            0,1,1,0,0,0,1,1,
                            0,1,1,0,0,0,1,1};

        public uint[] pixelO = { 0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0};

        public uint[] pixelP = { 0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0};

        public uint[] pixelQ = { 0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0};

        public uint[] pixelR = { 0,0,0,0,0,0,0,0,
                            0,1,1,1,1,0,0,0,
                            0,1,1,0,1,1,0,0,
                            0,1,1,0,1,1,0,0,
                            0,1,1,1,1,0,0,0,
                            0,1,1,0,1,1,0,0,
                            0,1,1,0,0,1,1,0,
                            0,1,1,0,0,1,1,0};

        public uint[] pixelS = { 0,0,0,0,0,0,0,0,
                            0,0,0,1,1,1,1,0,
                            0,0,1,1,1,1,1,0,
                            0,0,1,1,0,0,0,0,
                            0,0,0,1,1,0,0,0,
                            0,0,0,0,1,1,0,0,
                            0,1,1,1,1,1,1,0,
                            0,1,1,1,1,1,0,0};

        public uint[] pixelT = { 0,0,0,0,0,0,0,0,
                            0,1,1,1,1,1,1,0,
                            0,1,1,1,1,1,1,0,
                            0,0,0,1,1,0,0,0,
                            0,0,0,1,1,0,0,0,
                            0,0,0,1,1,0,0,0,
                            0,0,0,1,1,0,0,0,
                            0,0,0,1,1,0,0,0};

        public uint[] pixelU = { 0,0,0,0,0,0,0,0,
                            0,1,1,0,0,1,1,0,
                            0,1,1,0,0,1,1,0,
                            0,1,1,0,0,1,1,0,
                            0,1,1,0,0,1,1,0,
                            0,1,1,0,0,1,1,0,
                            0,0,1,1,1,1,0,0,
                            0,0,0,1,1,0,0,0};

        public uint[] pixelV = { 0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0};

        public uint[] pixelW = { 0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0};

        public uint[] pixelX = { 0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0};

        public uint[] pixelY = { 0,0,0,0,0,0,0,0,
                                 0,1,1,0,0,1,1,0,
                                 0,1,1,0,0,1,1,0,
                                 0,0,1,1,1,1,0,0,
                                 0,0,0,1,1,0,0,0,
                                 0,0,0,1,1,0,0,0,
                                 0,0,0,1,1,0,0,0,
                                 0,0,0,1,1,0,0,0};

        public uint[] pixelZ = { 0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0};

        public uint[] pixelEspace = { 0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,0,0};
        #endregion
        public void ChargementDuSysteme(int PixelX, int PixelY)
        {
            #region ChargementDuSysteme Lettre
            uint[] C = pixelC;
            uint[] H = pixelH;
            uint[] A = pixelA;
            uint[] R = pixelR;
            uint[] G = pixelG;
            uint[] E = pixelE;
            uint[] M = pixelM;
            uint[] E2 = pixelE;
            uint[] N = pixelN;
            uint[] T = pixelT;
            uint[] ESPACE = pixelEspace;
            uint[] D = pixelD;
            uint[] U = pixelU;
            uint[] ESPACE2 = pixelEspace;
            uint[] S = pixelS;
            uint[] Y = pixelY;
            uint[] S2 = pixelS;
            uint[] T2 = pixelT;
            uint[] E3 = pixelE;
            uint[] M2 = pixelM;
            uint[] E4 = pixelE;
            #endregion
            int hauteur = 8;
            int largeur = 8;
            int i;
            int t;
            uint x = 0, y = 0;
            int count = 0;
            for (i = 0; i < hauteur; i++)
            {
                for (t = 0; t < largeur; t++, count++,x++)
                {
                    if (C[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (C[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (H[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (H[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (A[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (A[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (R[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (R[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (G[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (G[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (E[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (E[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (M[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (M[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (E2[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (E2[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (N[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (N[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (T[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (T[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (ESPACE[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (ESPACE[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (D[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (D[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (U[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (U[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (S[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (S[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (Y[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (Y[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (S2[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (S2[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (T[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (T[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (E3[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (E3[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (M2[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (M2[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                    if (E4[count] == 1)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x1);
                    }
                    if (E4[count] == 0)
                    {
                        screen.SetPixel320x200x8(x + (uint)t + (uint)PixelX, y + (uint)i + (uint)PixelY, 0x0);
                    }
                }

            }
        }
    }
}

